<UserControl x:Class="QUT.Bio.SilverMap.HitStack"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:map2d="clr-namespace:QUT.Bio.Map2D"
             xmlns:util="clr-namespace:QUT.Bio.Util"
             MinWidth="150"
             MinHeight="100"
             SizeChanged="UserControl_SizeChanged"
             VerticalAlignment="Stretch"
             Margin="0">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/QUT.Bio;component/SilverMap/Simple Styles.xaml" />
                <ResourceDictionary Source="/QUT.Bio;component/SilverMap/Theme.xaml" />
                <ResourceDictionary Source="/QUT.Bio;component/SilverMap/HorizontalLayoutStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition x:Name="cddRow"
                           Height="Auto"
                           MinHeight="40" />
            <RowDefinition Height="20.02" />
            <RowDefinition x:Name="hitRow"
                           MinHeight="40" />
        </Grid.RowDefinitions>

        <TextBlock Name="cddLabel"
                   Text="Conserved domains"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   Height="16" />

        <Border Name="cddBorder"
                Grid.Row="1"
                ScrollViewer.VerticalScrollBarVisibility="Disabled"
                Margin="10,0,10,10"
                BorderThickness="1">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="Black"
                                  Offset="1" />
                    <GradientStop Color="White" />
                </LinearGradientBrush>
            </Border.BorderBrush>
            <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                          VerticalScrollBarVisibility="Auto"
                          Background="White"
                          Margin="0">
                <ScrollViewer.BorderBrush>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="Black"
                                      Offset="0" />
                        <GradientStop Color="{StaticResource NormalBorderBrushGradient1}"
                                      Offset="1" />
                    </LinearGradientBrush>
                </ScrollViewer.BorderBrush>
                <Canvas Name="domains"
                        Background="Transparent"
                        VerticalAlignment="Top" />
            </ScrollViewer>
        </Border>

        <TextBlock Text="Hits"
                   Grid.Row="2"
                   Height="16"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center" />

        <Border Grid.Row="3"
                ScrollViewer.VerticalScrollBarVisibility="Disabled"
                Margin="10,0"
                BorderThickness="1">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="Black"
                                  Offset="1" />
                    <GradientStop Color="White" />
                </LinearGradientBrush>
            </Border.BorderBrush>
            <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                          VerticalScrollBarVisibility="Auto"
                          MinHeight="30"
                          Background="White"
                          Margin="0"
                          BorderThickness="1">
                <ScrollViewer.BorderBrush>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="Black"
                                      Offset="0" />
                        <GradientStop Color="#FFBBBBBB"
                                      Offset="1" />
                    </LinearGradientBrush>
                </ScrollViewer.BorderBrush>
                <Grid>
                    <Canvas Name="underlay"
                            Background="Transparent"
                            VerticalAlignment="Top" />

                    <Canvas Name="hits"
                            Background="Transparent"
                            VerticalAlignment="Top" />
                </Grid>
            </ScrollViewer>
        </Border>
        <util:GridSplitter HorizontalAlignment="Stretch"
                           Margin="0"
                           Grid.Row="1"
                           ResizeDirection="Rows"
                           VerticalAlignment="Bottom"
                           Height="3"
                           Cursor="SizeNS"
                           Padding="0">
            <util:GridSplitter.Background>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="{StaticResource NormalBrushGradient4}"
                                  Offset="1" />
                    <GradientStop Color="White" />
                </LinearGradientBrush>
            </util:GridSplitter.Background>
        </util:GridSplitter>
    </Grid>
</UserControl>
